Copyright: 1998 (c) Glenn Chittenden Jr.


About gcjrWinDialogs

gcjrWinDialogs is an ActiveX DLL created with Visual Basic 5, and is intended to be used with 32-bit VB4 or above.  This DLL simplifies calling various dialogs provided by Windows, to which VB doesn't provide easy access.

This help file explains how to call the various procedures contained in the DLL.

If you have any problems, please send the to glenn@gcjr.com.


Using gcjrWinDialogs

In order to use "gcjrWinDialogs", you must first add it to your project references.  Once referenced, you can call the functions as if they were a part of the VB invironment.


gcBrowseForFolder
This dialog allows the user to select a folder on their system.

Syntax:

sPath = gcBrowseForFolder(hWnd, [DialogText], [StartFolder])

hWnd 	The handle of the form calling the dialog.

DialogText	The text displayed at the top of the dialog.

StartFolder	Allows you to pre-select a folder before the 	dialog is created.

The returned string is the path selected by the user.


gcRunDialog
Syntax

gcRunDialog hWnd, [sTitle], [sPrompt], [NoLastRunMRU]

hWnd	The handle of the form calling the dialog.

sTitle	Text to be displayed on the titlebar.

sPrompt	Text to replace the default prompt.

NoLastRunMRU	A boolean value indicating if you want the last 	file used with the "Run" dialog to be selected 	when the dialog appears.


gcRestart
Syntax:

gcRestart hWnd, [sPrompt], [uFlag]

hWnd 	The handle of the form.

sPrompt	Adds your own prompt in front of the default. (Does 	not replace the default prompt.

uFlag	If set to "NoPrompt", the system will reboot without 	the dialog.


gcShutDown
Syntax:

gcShutDown


ShowProperties
Syntax:

ShowProperties filename, OwnerhWnd

filename	The full path and filename to display the properties 	for.

OwnerhWnd	The handle of the form calling the dialog.


OpenWithDialog
Syntax:

OpenWithDialog sFullPath

sFullPath	The full path and filename.


gcFormat
gcFormat displays the format dialog for the specified drive.

Syntax:

gcFormat hWnd, drv

hWnd	The handle of the window calling the dialog.

drv	A long repersenting the drive.  ( 0 to the number of 	drives on the system.)


ScreenSaver
Installs a screen saver and displays the "ScreenSaver" tab on the "Display Properties" dialog.

Syntax:

ScreenSaver sFile

sFile	The filename of the screen saver. The file must in in 	the "Windows\System" directory.


ControlDialogs

ControlDialogs displays a number of dialogs; mainly those availible from the "Control Panel".  Below is a list of the dialogs.

Syntax:

ControlDialogs d

d	One of the following items.  I used a Public Enum so 	you don't have to remember values.

ControlPanel     AccGeneralProps     AccDisplay     AccKeyboard     AccMouse     AccSound     AddNewHardware     AddNewPrinter     InstallUninstall     WindowsSetup     StartupDisk     Briefcase     CopyDisk     DateAndTime     TimeZone     SystemHardware     SystemPerformance     Telephony	KeyboardLanguage     PrinterFolder     PowerManagement     ModemWizard     MMAudio     MMVideo     MMMidi     MMCD     MMAdvanced     Sounds     Network     ODBC32     PasswordChange     Regional     RegionalNumbers     RegionalDate     Users


gcShutDown